manually trigger attestations (#1379)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Mon, 11 Nov 2024 14:28:20 +0000 (07:28 -0700)
committerGitHub <noreply@github.com>
Mon, 11 Nov 2024 14:28:20 +0000 (07:28 -0700)
* use dispatch parameter to include attestation.

* restrict attestation to release flavor

.github/workflows/macos.yml
.github/workflows/ubuntu.yml
.github/workflows/windows.yml

index 74894a8d4bb19a464f48f3d431d83675bc4d6596..14032c6c7097aa7460bb8fc5be385891b189babc 100644 (file)
@@ -8,7 +8,13 @@ on:
     branches: [ master ]
   schedule:
     - cron: '27 4 * * 2'
-  workflow_dispatch: ~
+  workflow_dispatch:
+    inputs:
+      attestation:
+        description: 'Generate attestation for binary artifacts'
+        required: false
+        default: false
+        type: boolean
 
 jobs:
   macos:
@@ -99,7 +105,7 @@ jobs:
         ./tools/ci_script_osx.sh . ${{ matrix.QT_VERSION }} ${{ matrix.GENERATOR }}
 
     - name: Generate artifact attestation
-      if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) && matrix.RELEASE
+      if: ${{ inputs.attestation && matrix.RELEASE }}
       uses: actions/attest-build-provenance@v1
       with:
         subject-path: 'gui/GPSBabel-*.dmg'
index bc065153f8cf2a5eb464f2c34135a0e9115850b8..16238c40e5fc0e04712faedb4645123d62bc26bd 100644 (file)
@@ -8,7 +8,13 @@ on:
     branches: [ master ]
   schedule:
     - cron: '27 4 * * 2'
-  workflow_dispatch: ~
+  workflow_dispatch:
+    inputs:
+      attestation:
+        description: 'Generate attestation for binary artifacts'
+        required: false
+        default: false
+        type: boolean
 
 jobs:
   ubuntu:
@@ -111,7 +117,7 @@ jobs:
         ./testo -p /snap/bin/gpsbabel 
 
     - name: Generate artifact attestation
-      if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' )
+      if: ${{ inputs.attestation }}
       uses: actions/attest-build-provenance@v1
       with:
         subject-path: ${{ steps.build-snap.outputs.snap }}
index bd328299530eeaa0fd761df5adde5cabf53b4eb7..dd90c3edead0476ae469538dcb57580c13cdf341 100644 (file)
@@ -8,7 +8,13 @@ on:
     branches: [ master ]
   schedule:
     - cron: '27 4 * * 2'
-  workflow_dispatch: ~
+  workflow_dispatch:
+    inputs:
+      attestation:
+        description: 'Generate attestation for binary artifacts'
+        required: false
+        default: false
+        type: boolean
 
 jobs:
 
@@ -103,7 +109,7 @@ jobs:
         PNAME=./bld/gui/package/gpsbabel.exe GBTEMP=./gbtemp ./test_encoding_utf8 2>&1
 
     - name: Generate artifact attestation
-      if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) && matrix.RELEASE
+      if: ${{ inputs.attestation && matrix.RELEASE }}
       uses: actions/attest-build-provenance@v1
       with:
         subject-path: 'bld/gui/GPSBabel-*-Setup.exe'
@@ -124,6 +130,6 @@ jobs:
       with:
         name: Windows_Installer ${{ join(matrix.*) }}
         path: |
-          ./bld/gui/GPSBabel-*-Setup.exe
-          ./bld/gui/GPSBabel-*-Manifest.txt
+          bld/gui/GPSBabel-*-Setup.exe
+          bld/gui/GPSBabel-*-Manifest.txt
         retention-days: 7